﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using blackhouse.WebNemo.Data;

namespace blackhouse.WebNemo.Business.Users {
	public class DecoNemoUser : INemoUser {

		#region Fields

		protected INemoUser instance;

		#endregion

		#region Properties

		public int UserId {
			get { return this.instance.UserId; }
		}
		public string Name {
			get { return this.instance.Name; }
		}

		#endregion

		#region Constructors

		public DecoNemoUser(INemoUser decoUser) {
			this.instance = decoUser;
		}

		#endregion

		#region Methods

		public virtual INemoUser GetUser(int userId) {
			return this.instance.GetUser(userId);
		}

		public virtual INemoUser GetCurrentUser() {
			return this.instance.GetCurrentUser();
		}

		public virtual bool HasSufficientPermissions(bool redirectToAccessDenied) {
			return this.GetCurrentUser() != null;
		}

		#endregion

	}
}